{extend name="layout/common_layout" /}
{block name="body"}
    <!--tab标签-->
<div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">用户管理</li>
            <li class=""><a href="{:url('admin/user/add')}">添加用户</a></li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form class="layui-form layui-form-pane" action="{:url('admin/user/index')}" method="get">
                    <div class="layui-inline">
                        <label class="layui-form-label">关键词</label>
                        <div class="layui-input-inline">
                            <input type="text" name="keyword" value="{$keyword}" placeholder="请输入账号" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <button class="layui-btn">搜索</button>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">总人数：</label>
                        <div class="layui-input-inline">
                            <input type="text" value="{$allnum}"class="layui-input" style="color: #0C0C0C">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">会员人数：</label>
                        <div class="layui-input-inline">
                            <input type="text" value="{$membernum}"class="layui-input" style="color: #0BB20C">
                        </div>
                    </div>
                </form>
                <hr>

                <table class="layui-table">
                    <thead>
                    <tr>
                        <th style="width: 30px;">ID</th>
                        <th>账号</th>
                        <th>邀请码</th>
                        <th>上级用户</th>
                        <th>账户余额(/美元)</th>
                        <th>支付宝</th>
                        <th>银行名称</th>
                        <th>银行卡号</th>
                        <th>银行预留手机号</th>
                        <th>银行预留姓名</th>
                        <th>状态</th>
                        <th>类型</th>
                        <th>累计收益</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {foreach name="user_list" item="vo"}
                    <tr>
                        <td>{$vo.u_id}</td>
                        <td>{$vo.u_email}</td>
                        <td>{$vo.u_code}</td>
                        <td>{$vo.uoneeamil}</td>
                        <td>{$vo.u_dollar_balance}</td>
                        <td>{$vo.u_alipay}</td>
                        <td>
                            {if condition="$vo.u_bank_type eq 1"}工商银行{/if}
                            {if condition="$vo.u_bank_type eq 2"}农业银行{/if}
                            {if condition="$vo.u_bank_type eq 3"}中国银行{/if}
                            {if condition="$vo.u_bank_type eq 4"}建设银行{/if}
                            {if condition="$vo.u_bank_type eq 5"}交通银行{/if}
                        </td>
                        <td>{$vo.u_bank_card_code}</td>
                        <td>{$vo.u_bank_phone}</td>
                        <td>{$vo.u_name_bank}</td>
                        <td>{php}echo $vo['u_status']==1 ? '启用' : '禁用';{/php}</td>
                        {if condition="$vo.u_type eq 1"}
                            <td style="color:darkgreen; font-weight:bold;">注册用户</td>
                        {else/}
                            <td style="color: red; font-weight:bold;">系统用户</td>
                        {/if}
                        <td>{$vo.u_all_profit}</td>
                        <td>
                            <a href="{:url('admin/user/detail',['id'=>$vo['u_id']])}" class="layui-btn layui-btn-normal layui-btn-mini">编辑</a>
                            <a href="{:url('admin/user/edit',['id'=>$vo['u_id'], 'u_status' => $vo['u_status']])}" class="layui-btn layui-btn-danger layui-btn-mini ajax-confim">{php}echo $vo['u_status']==2 ? '启用' : '禁用';{/php}</a>
                            <a href="{:url('admin/user/securitiesincome',['id'=>$vo['u_id'], 'email' => $vo['u_email']])}" class="layui-btn layui-btn-normal layui-btn-mini">证券收益</a>
                            <a href="{:url('admin/user/extensionuser',['id'=>$vo['u_id']])}" class="layui-btn layui-btn-normal layui-btn-mini">推广用户</a>
                            {if condition="$vo.u_type eq 1"}
                                <a href="{:url('admin/user/updatepassword',['id'=>$vo['u_id']])}" class="layui-btn layui-btn-danger layui-btn-mini ajax-confim">重置密码</a>
                            {/if}
                        </td>
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
                <!--分页-->
                {notempty name = 'user_list'}
                {$user_list->render()}
                {/notempty}
            </div>
        </div>
</div>
{/block}